﻿using BuildPlannerLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BuildPlanner
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private DataContextMain dc;

        public MainWindow(Build build, string mapSelectValue)
        {
            dc = new DataContextMain(build, mapSelectValue);
            this.DataContext = dc;
            InitializeComponent();
        }

        #region General Methods
        private void StatusChange(String updateText)
        {
            dc.Status = updateText;
        }
        #endregion


        #region Event Handlers
        private void Window_MouseDown(object sender, MouseButtonEventArgs e)
        {
            StatusChange("");
        }

        private void test_click(object sender, RoutedEventArgs e)
        {
            dc.Update();
        }
        #endregion


        #region Command Handlers
        private void CloseCommandHandler(object sender, ExecutedRoutedEventArgs e)
        {
            this.Close();
        }
        #endregion
        


    }
}
